// 导入组件
import Vue from 'vue';
import VueAudio from 'vue-audio-better';
Vue.use(VueAudio);

import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 商品管理
import Goods from '@/views/goods/Goods';
// 机器信息管理
import Machine from '@/views/machine/Machine';
// 货道信息管理
import MachineAisle from '@/views/machine/MachineAisle';
/**
 * 订单管理
 */
// 交易订单
import Order from '@/views/pay/Order';
/**
 * 系统管理
 */
// 用户管理
import user from '@/views/system/user';
// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';
// 系统环境变量
import Variable from '@/views/system/Variable';
// 权限管理
import Permission from '@/views/system/Permission';
/**
 * 支付管理
 */
// 支付配置信息
import MachineConfig from '@/views/machine/MachineConfig';
// 支付配置
import Config from '@/views/pay/Config';
/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/charts/statistics';

// 图表界面
import meIndex from '@/views/system/me/index';

// 项目
import projectIndex from '@/views/base/project/index';
// 问卷
import surveyIndex from '@/views/base/survey/index';
// 问卷设计
import surveyDesign from '@/views/base/survey/design';
// 样本复核
import surveyChecked from '@/views/base/survey/checked';

import surveyDetails from  '@/views/base/survey/detail';
// 外线号码
import pstnNumber from '@/views/base/pstnNumber/index';
// 首页
import home from '@/views/home';
// 工作台
import work from '@/views/base/work/work';

// 工作台
import shift from '@/views/base/work/shift';
//开始调查
import startPage from '@/views/base/work/start';
// 坐席
import seat from '@/views/base/seat';

// 队列
import queue from '@/views/base/queue';

//号码仓库
import repository from '@/views/base/repository';

//问卷详情
import surveyDetail from '@/views/base/survey/detail'

//问卷详情
import datasourceIndex from '@/views/database/datasource/index'

//问卷详情
import datasourceTableApiDesign from '@/views/database/datasource/designApi'

//接口首页
import apiIndex from '@/views/database/api/index'

//数据字典首页
import dictIndex from '@/views/database/dict/index'

//数据字典管理
import dictManage from '@/views/database/dict/manage'

//公众号素材管理
import wxMaterial from '@/views/wx/material/index'

//公众号菜单管理
import wxMenu from '@/views/wx/menu/index'

import wxOffiaccount from '@/views/wx/offiaccount/index'

//坐席监控
import monitorPage from '@/views/base/work/moniter';

import task from '@/views/cti/task/index';

// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
  routes: [{
    path: '/',
    name: '',
    component: index,
    hidden: true,
    meta: {
      requireAuth: false
    }
  }, {
    path: '/index',
    name: '首页',
    component: index,
    iconCls: 'el-icon-tickets',
    children: [{
      path: '/home',
      name: '首页',
      component: home,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/survey/detail',
      name: '号码仓库',
      component: surveyDetail,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/survey/checked',
      name: '样本审核',
      component: surveyChecked,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/repository/index',
      name: '号码仓库',
      component: repository,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/survey/detail',
      name: '问卷详情',
      component: surveyDetails,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/queue/index',
      name: '队列管理',
      component: queue,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/seat/index',
      name: '坐席管理',
      component: seat,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/cti/task/index',
      name: '外呼计划',
      component: task,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/work/work',
      name: '工作准备',
      component: work,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/work/start',
      name: '开始调查',
      component: startPage,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/work/monitor',
      name: '坐席监控',
      component: monitorPage,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/work/shift',
      name: '班次管理',
      component: shift,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/machine/Machine',
      name: '机器信息管理',
      component: Machine,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/project/index',
      name: '项目管理',
      component: projectIndex,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/survey/index',
      name: '问卷管理',
      component: surveyIndex,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/machine/MachineAisle',
      name: '货道信息管理',
      component: MachineAisle,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/pay/Order',
      name: '交易订单',
      component: Order,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/system/user',
      name: '用户管理',
      component: user,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/system/Module',
      name: '菜单管理',
      component: Module,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/system/Role',
      name: '角色管理',
      component: Role,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/system/Dept',
      name: '公司管理',
      component: Dept,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/system/Variable',
      name: '系统环境变量',
      component: Variable,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/system/Permission',
      name: '权限管理',
      component: Permission,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/machine/MachineConfig',
      name: '支付配置信息',
      component: MachineConfig,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/pay/Config',
      name: '支付配置',
      component: Config,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/druid/login',
      name: '监控查询',
      component: druidLogin,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/charts/statistics',
      name: '数据可视化',
      component: statistics,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/system/me/index',
      name: '个人中心',
      component: meIndex,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/pstnNumber/index',
      name: '热线号码',
      component: pstnNumber,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/base/survey/design',
      name: '问卷设计',
      component: surveyDesign,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/database/datasource/index',
      name: '数据源',
      component: datasourceIndex,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/database/datasource/designApi',
      name: '数据源',
      component: datasourceTableApiDesign,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/database/api/index',
      name: 'API接口',
      component: apiIndex,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/database/dict/index',
      name: '数据字典',
      component: dictIndex,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/database/dict/manage',
      name: '数据字典管理',
      component: dictManage,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/wx/material/index',
      name: '公众号素材',
      component: wxMaterial,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/wx/menu/index',
      name: '公众号菜单',
      component: wxMenu,
      meta: {
        requireAuth: true
      }
    }, {
      path: '/wx/offiaccount/index',
      name: '公众号',
      component: wxOffiaccount,
      meta: {
        requireAuth: true
      }
    }]
  }]
})
